Skip to content

Add Operator role with MCP integration and upgrade to .NET 10#3

Merged
techbuzzz merged 5 commits into
mainfrom
develop
Jun 19, 2026
Merged

Add Operator role with MCP integration and upgrade to .NET 10#3
techbuzzz merged 5 commits into
mainfrom
develop

Conversation

@techbuzzz

Copy link
Copy Markdown
Owner

Pull Request

Description

This PR brings the develop branch to the v10.1.1 state of Delibera.Core, the .NET 10 / C# 15 framework for collective AI decision-making via structured multi-model deliberation. It bundles three releases landed on develop plus a small docs hotfix:

  • Operator role with MCP integration — a lightweight micro-agent that connects the council to Model Context Protocol servers, exposing tools (web search, filesystem, Notion, PostgreSQL, debate history, etc.) to debate participants via the [[OPERATOR: task]] marker. Operator plans tool calls with its own cheaper LLM, executes MCP tools, interprets results, and reuses the council's compression strategy.
  • Microsoft.Extensions.AI integration (10.7.0) — first-class, additive interop with the standard IChatClient / IEmbeddingGenerator abstractions. Adds ChatClientLLMProvider, EmbeddingGeneratorProvider, MicrosoftAIExtensions (AsLLMProvider / AsEmbeddingProvider / AsChatClient, WithMiddleware), ProviderFactory.CreateFromChatClient, and AddDeliberaChatClient / AddDeliberaEmbeddingGenerator DI helpers. Fully backward compatible.
  • .NET 10 / C# 15 upgrade & performance work — LangVersion preview, latest Microsoft.SourceLink.GitHub, SIMD-vectorized CosineSimilarity (ReadOnlySpan<float> + Vector<float>), allocation-free TokenCounter (ReadOnlySpan<char>), and CompressionCache.ComputeKey using ArrayPool<T> + stackalloc SHA-256.
  • Code-style refactor — expression-bodied members expanded to full block bodies across Compression, Council, Debate, DI, Providers, Models and Interfaces for consistency, clearer disposal patterns, and improved null/empty handling. No behavioral changes.
  • Docs hotfixsrc/Delibera.Core/README.md: switch relative LICENSE / QuickStart / CONTRIBUTING / repo links to absolute github.com/techbuzzz/Delibera URLs so they resolve correctly when the file is consumed as the NuGet package readme.

Also adds the Delibera.Core.Tests project (20 unit tests with fakes, no network), the Delibera.slnx solution file, a full Russian-localized doc set (README-RU.md, QuickStart-RU.md, NET10-Upgrade-RU.md), the MicrosoftExtensionsAiExample and OperatorMcpToolsExample console examples (--msai, --operator, --operator-mcp flags), and the CHANGELOG.md.

Related Issues

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behaviour)
  • Documentation update
  • Refactor / chore

Checklist

  • My code follows the project's coding standards (see CONTRIBUTING.md)
  • The solution builds with 0 errors and 0 warnings (dotnet build --configuration Release)
  • I have added/updated XML documentation for public APIs
  • I have updated relevant documentation (README.md, QuickStart.md)
  • I have tested my changes (examples run as expected)

Additional Notes

  • Package: Delibera.Core 10.1.1 (MIT) — release notes embedded in the .csproj.
  • Public API impact: additive only. The Microsoft.Extensions.AI surfaces, ILLMProvider.ChatStreamAsync default, and Operator/MCP types are non-breaking extensions.
  • New dependencies: Microsoft.Extensions.AI 10.7.0, ModelContextProtocol 1.4.0; other packages already at their latest .NET 10 versions.
  • Target framework: net10.0, LangVersion preview (C# 15).
  • Tests: 20 unit tests in tests/Delibera.Core.Tests using FakeChatClient / FakeEmbeddingGenerator — no live network calls.
  • Uncommitted change in this PR: src/Delibera.Core/README.md — replace relative ../LICENSE etc. with absolute https://github.com/techbuzzz/Delibera/blob/develop/... URLs (fixes broken links in the NuGet package readme).
  • Reviewer focus areas: Operator tool-call loop & safety boundaries in Council/Operator.cs, MCP transport wiring in Providers/Mcp/McpClientAdapter.cs, streaming path in ChatClientLLMProvider, and the new DI extensions in ServiceCollectionExtensions / MicrosoftAIExtensions.

techbuzzz and others added 3 commits June 16, 2026 10:31
… C# 15 (#1)

* feat: add Operator (MCP tools) micro-agent role

Introduce a new Operator role — a lightweight micro-agent that connects the
council to MCP (Model Context Protocol) servers and exposes their tools
(web search, filesystem, Notion, PostgreSQL, debate history, etc.) to debate
participants.

- Participants delegate tasks at any moment via the [[OPERATOR: task]] marker
- Operator uses its own cheaper LLM to plan tool calls, execute MCP tools and
  interpret results, optionally reusing the council's compression strategy
- Wired through all debate strategies (Standard/Critique/Consensus),
  CouncilExecutor, CouncilBuilder and DI options (Delibera:Operator)
- DI-initializable; supports stdio and HTTP MCP transports
- Per-round Operator interactions rendered in the final Markdown report
- Adds ModelContextProtocol package, console --operator flag, example & docs

* feat: upgrade to .NET 10 / C# 15, high-perf optimizations & MCP tools example

- Bump LangVersion to preview (C# 15) in both projects
- Update Microsoft.SourceLink.GitHub to 10.0.300 (other deps already at latest .NET 10 versions)
- Perf: SIMD-vectorized CosineSimilarity (ReadOnlySpan<float> + Vector<float>)
- Perf: TokenCounter ReadOnlySpan<char> overload (alloc-free word counting)
- Perf: CompressionCache.ComputeKey uses ArrayPool<T> + stackalloc SHA-256
- Add OperatorMcpToolsExample (browser via @playwright/mcp, Marp presentations) + --operator-mcp flag
- Fix nullable warning in Program.cs
- Add Russian docs: docs/NET10-Upgrade-RU.md

* docs: Add English version of .NET 10 upgrade documentation

* docs: Update README and QuickStart with Operator role documentation

---------

Co-authored-by: techbuzzz <victor.buzin@users.noreply.github.com>
Co-authored-by: Delibera Agent <agent@delibera.local>
…tor) [v10.1.1] (#2)

Add first-class interop with the standard Microsoft.Extensions.AI v10.7.0
abstractions while preserving the existing public API (additive only).

- Delibera.Core: add Microsoft.Extensions.AI 10.7.0; bump 10.1.0 -> 10.1.1
- ChatClientLLMProvider: ILLMProvider implemented over IChatClient (+ streaming)
- EmbeddingGeneratorProvider: IEmbeddingProvider over IEmbeddingGenerator
- MicrosoftAIExtensions: AsLLMProvider/AsEmbeddingProvider/AsChatClient bridges
  + WithMiddleware (logging + function invocation)
- ILLMProvider: additive default ChatStreamAsync (non-breaking)
- OllamaProvider: expose native AsChatClient()/AsEmbeddingGenerator()
- ProviderFactory.CreateFromChatClient + DI AddDeliberaChatClient/EmbeddingGenerator
- ConsoleApp: --msai example
- tests: new Delibera.Core.Tests (20 tests, fakes; no live network)
- docs: README/README-RU/QuickStart/CHANGELOG + solution file
Refactored expression-bodied members to full block-bodied methods for improved consistency and maintainability. Updated method/property implementations, reordered some fields, and enhanced property clarity. Restored or moved obsolete/compatibility methods. Improved disposal patterns in factories and clarified null/empty handling. No changes to core business logic; focus is on code style and API consistency.
@techbuzzz techbuzzz added documentation Improvements or additions to documentation enhancement New feature or request labels Jun 18, 2026
Major overhaul of README.md for clarity and completeness:
- Expanded intro, features, and quick start with prerequisites
- Improved code samples and formatting throughout
- Added detailed sections for DI, Microsoft.Extensions.AI interop, context compression, RAG, Operator, and output files
- Provided a more comprehensive appsettings.json example
- Updated NuGet dependencies table and all repo links
- README.md no longer included in NuGet package in .csproj
- Numerous minor language, formatting, and consistency fixes
@techbuzzz techbuzzz self-assigned this Jun 18, 2026
Added icon.png as the NuGet package icon via <PackageIcon> and ensured README.md is packed with the package for better documentation.
@techbuzzz techbuzzz merged commit 98383fc into main Jun 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant